UDP Protocol

The HSM client expects all UDP connections to be made on the Well-Known-Port at the IP address (see Chapter 1). The IP address and Well-Known-Port address are defined to the HSM when configuring the software settings with the Console CH command.

All UDP host clients sending data to the HSM send the datagrams to the Well-Known-Port at the IP address. The HSM (UDP server) processes the datagram and returns a datagram response to the originating UDP host client.

UDP is a connection-less protocol. If the HSM detects an error in a received datagram it is discarded. The UDP host client should support a time-out mechanism whereby if a response is not received within the time-out period the original request is re-sent.

Sending Commands

The HSM expects a command to be sent in the form defined in the table.

Field

Size

Format

Description

LENGTH

2

Byte

Length of the COMMAND field

COMMAND

n

Byte

HSM command

Note: The field COMMAND should not bracketed by X’02 - X’03 as used with the Async protocol.

Only a single command can be sent to an HSM in one UDP transmission (packet).

Example:

The command format for a diagnostics command (NC) is:

X’00  X’06  X’31  X’32  X’33  X’34  X’4E  X’43

where the HSM message header length is set to 04, a message header of 1234 is used, and character representation is ASCII.

Returning Responses

When the HSM receives a command from a UDP client the command is processed and the response returned to the UDP client. The response is of the form defined in the table.

Field

Size

Format

Description

LENGTH

2

Byte

Length of the RESPONSE field

RESPONSE

n

Byte

HSM response

Note: The field RESPONSE is not bracketed by X’02 - X’03 (or alternative value) as used with the Async protocol.

The result of each command sent to an HSM is returned as a separate response to the UDP client.

Example:

The response format from a diagnostics command (NC) is:

X'00

X'18

X'31

X'32

X'33

X'34

X'4E

X'43

X'30

X'30

X'32

X'36

X'38

X'36

X'30

X'34

X'37

X'34

X'34

X'34

X'39

X'31

X'32

X'34

X'32

X'32

X'30

X'30

X'30

X'37

X'2D

X'45

X'30

X'30

X'30

  

where the HSM message header length in set to 04, a message header of 1234 is used, and the character representation is ASCII.

The example shows the error code returned was 00 and the LMK check value returned was 2686047444912422 and the firmware installed is 0007-E000.